/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cassys.delegates;

import cassys.datatransferobjects.PeerAssessmentDTO;
import cassys.datatransferobjects.PeerAssessmentEvaluationDTO;
import cassys.ejb.sessionbean.PeerAssessmentBeanRemote;
import cassys.servicelocator.ServiceLocator;
import java.util.ArrayList;

/**
 *
 * @author Priyanka
 */
public class PeerAssessmentDelegate {
    
     private PeerAssessmentBeanRemote passessmentBean = null;

    public PeerAssessmentDelegate() {
       passessmentBean= (PeerAssessmentBeanRemote) ServiceLocator.getInstance().lookupPeerAssessementBean();        
    }
    
    public void insertPA(PeerAssessmentDTO dto){
         passessmentBean.insertPA(dto);
     }
    
    public void updatePA(PeerAssessmentDTO dto){
    passessmentBean.updatePA(dto);
    }
    public void deletePA(PeerAssessmentDTO dto){
    passessmentBean.deletePA(dto);
    }
    public PeerAssessmentDTO findPA(String paId){
        return passessmentBean.findPA(paId);
    }
    public PeerAssessmentDTO findPAByModule(String moduleCode){
        return passessmentBean.findPAByModule(moduleCode);
    }
    public ArrayList<PeerAssessmentEvaluationDTO> findALLPAEvalution(){
      return  passessmentBean.findALLPAEvalution();

    }

    public ArrayList<PeerAssessmentEvaluationDTO> findPeerAssessmentEvalutionForAPA(String paID){
        return passessmentBean.findPeerAssessmentEvalutionForAPA(paID);
    }
    
    
}
